<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
 //打印出1000-2000年中所有的闰年，并以每行四个数的形式输出 
 
        for(var year =1000; year<=2000; year++) {
        if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0){
            
        var a = parseInt(year%10)
        var b =parseInt((year/10)%10)
        var c =parseInt((year/100)%10 )
        var d =parseInt(year/1000)
           console.log(d,c,b,a)
    }else{
      
    }

 

 }
 
 
 

    </script>
</body>
</html>